/*
The MIT License (MIT)

Copyright (c) 2013 Mike Dapiran, Brian May, Richard Pospesel, and Bert Wierenga

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software 
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#ifdef __cplusplus
#pragma once

#include <Windows.h>
#include "Hogshead.Core.h"

#include <D3DX11.h>
#ifdef _DEBUG
	#pragma comment(lib, "d3dx11d.lib")
#else
	#pragma comment(lib, "d3dx11.lib")
#endif




namespace Hogshead
{
	namespace DX11Rendering
	{
		class DX11StaticMeshInfo;
		class DX11GuiRectangleInfo;
		class DX11ParticleInfo;

		class DX11Manager;

		//directors
		class DX11Director;
		class HavokDirector;

		//processes
		class IProcess;
		class DiffuseSpecularProcess;
		class ParticleProcess;
		class GuiRender;
		class GUIProcess;
		class DebugRender;
		class MeshProcess;

		//components
		class Camera;
		class ParticleSystem;

		//content
		class MeshFilter;
		class StaticMesh;

		class Shader;
		class VertexShader;
		class GeometryShader;
		class PixelShader;
		class Texture;
		class ConstantBufferGroup;
		class InputLayout;

		class BlendState;
		class RasterizerState;
		class SamplerState;
		class DepthStencilState;

		//animation
		class Skeleton;
		class AnimationBinding;
		class MeshBinding;

		//RenderInfo
		class DX11Mesh;

		//render data types
	
		struct Vertex;
		struct DiffuseDynamic;
		struct DiffuseStatic;

		//Messages
		class SetAnimationAttributesMessage;
		class AnimationCycleCompleteAlertMessage;
		class ToggleAnimationMessage;
		class SetPointsMessage;
		class SetIKInfoMessage;
		class AnnotationMessage;
		class SetExtractedMotionEnabledMessage;
		class ClearIKMessage;
		class AnimationsPlayingMessage;
		class SetParticleSystemEnabledMessage;
		class ParticleSystemPulseMessage;
		class SetParticleSystemAttributes;
		class AnimationPauseMessage;
		class TemporarySpeedModifierMessage;

		//Components
		class StaticMeshRenderer;
		class GuiRectangle;
		class PointLight;
		class DirectionalLight;
		class AnimatedMeshRenderer;
		class DebugWireframe;

		//enums
		class ParticleSystemState;

		//Level
		class SceneTreeSegment;

		/** 
		* Called to initialize this library.
		* 
		* @param in_game The Game that is using this library.
		* @param in_handle The window handle for the window we want to render to.
		*/
		void initialize(IGame* in_game, HWND in_handle);

		/**
		* Called to finalize this library.
		*/
		void finalize();

		/**
		* Used internally; do not call.
		*/
		void registerComponents();

		/**
		* Used internally; do not call.
		*/
		void registerDirectors();

		/**
		* Used internally; do not call.
		*/
		void registerContent();

	}
}



//some declarations
#include "HLSLCPPDeclarations\Texture2DMappings.fx"
#include "HLSLCPPDeclarations\ConstantBuffers.fx"

//some declarations
#include "EnumConstDeclarations\Shaders.h"
#include "EnumConstDeclarations\Primitives.h"


//messages
#include "Messages\ConstantBufferModifier.h"
#include "Messages\SetPointsMessage.h"
#include "Messages\GUIButtonReleasedMessage.h"
#include "Messages\ChangeLightMessage.h"

#include "Components\Camera.h"

#include "Content\MeshFilter.h"


//content types
#include "Content\StringToEnum.h"
#include "Content\InputLayout.h"
#include "Content\Shader.h"
#include "Content\VertexShader.h"
#include "Content\GeometryShader.h"
#include "Content\PixelShader.h"
#include "Content\Texture.h"
#include "Content\BlendState.h"
#include "Content\RasterizerState.h"
#include "Content\SamplerState.h"
#include "Content\DepthStencilState.h"


//some data structures
#include "DataStructures\ConstantBuffer\ConstantBuffer.h"
#include "DataStructures\ConstantBuffer\ConstantBufferGroup.h"
#include "DataStructures\RenderingTextureBuffer.h"

//components
#include "Components\GuiRectangle.h"
#include "Components\GUIComponent.h"
#include "Components\GUITexture.h"
#include "Components\GUIButton.h"
#include "Components\PointLight.h"
#include "Components\ParticleSystem.h"
#include "Components\DirectionalLight.h"
#include "Components\SpotLight.h"

#include "Components\MeshRenderer.h"

#include "Components\DebugWireframe.h"


#include "Managers\DX11Manager.h"

#include "Directors\DX11Director.h"
#include "Directors\IProcess.h"

//processes for the director
#include "Processes\MeshProcess.h"
#include "Processes\ParticleProcess.h"
#include "Processes\GuiRender.h"
#include "Processes\GUIProcess.h"
#include "Processes\DebugRender.h"

#include "Messages\ParticleSystemState.h"
#include "Messages\SetParticleSystemEnabledMessage.h"
#include "Messages\ParticleSystemPulseMessage.h"
#include "Messages\SetParticleSystemAttributes.h"

#include "Components\SceneTreeSegment.h"

using namespace Hogshead::DX11Rendering;

#else
//some declarations
#include "HLSLCPPDeclarations\Texture2DMappings.fx"
#include "HLSLCPPDeclarations\ConstantBuffers.fx"

#endif